package com.cqc.jdk8.Jutil.concurrent.locks.ReentrantLock.demo4;


/**
 *
 */
public class ReentranLockTest {
    /**
     * 我们发现 2个线程间隔了5s，也就是说被阻塞了。
     * 2025-6-27 17:02:26,Thread-0
     * 2025-6-27 17:02:31,Thread-1
     */
    public static void main(String[] args) {
        Counter counter = new Counter();
        for (int i = 0; i < 2; i++) {
            new Thread(() -> {
                counter.f1();
            }).start();
        }
    }


}
